package com.lanou.moving.activity;

import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.lanou.moving.R;
import com.lanou.moving.adapter.DownloadAdapter;
import com.lanou.moving.base.BaseActivity;

public class MusicDownloadActivity extends BaseActivity implements View.OnClickListener {
    private TabLayout music_download_tablayout;
    private ViewPager music_download_viewpager;
    private DownloadAdapter adapter;
    private ImageView music_download_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_music_download);
        music_download_back = (ImageView) findViewById(R.id.music_download_back);
        music_download_back.setOnClickListener(this);
        music_download_viewpager = (ViewPager) findViewById(R.id.music_download_viewpager);
        music_download_tablayout = (TabLayout) findViewById(R.id.music_download_tablayout);
        adapter = new DownloadAdapter(getSupportFragmentManager());
        music_download_viewpager.setAdapter(adapter);
        music_download_tablayout.setupWithViewPager(music_download_viewpager);
        music_download_tablayout.setSelectedTabIndicatorColor(getResources().getColor(R.color.resideMenu_bg));
        music_download_tablayout.setTabTextColors(getResources().getColor(R.color.cardview_dark_background)
                , getResources().getColor(R.color.resideMenu_bg));
    }

    @Override
    public void onClick(View v) {
        finish();
    }
}
